package com.photoeditor.demo.model.bean.face;

import android.os.Parcel;

/**
 * Created by @author wumingguang on 2019/05/24.
 */

public class FaceDetectBeanV4 extends BaseFaceResultBean {

    public int code;
    /**
     * 种族
     */
    public String ethnicity;
    /**
     * 性别
     */
    public String gender;
    public FaceContour landMark;

    public FaceDetectBeanV4() {
        super(REPORT_TYPE_EXOTIC);
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getEthnicity() {
        return ethnicity;
    }

    public void setEthnicity(String ethnicity) {
        this.ethnicity = ethnicity;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public FaceContour getLandMark() {
        return landMark;
    }

    public void setLandMark(FaceContour landMark) {
        this.landMark = landMark;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        super.writeToParcel(dest, flags);
        dest.writeInt(this.code);
        dest.writeString(this.gender);
        dest.writeString(this.ethnicity);
        dest.writeParcelable(this.landMark, flags);
    }

    protected FaceDetectBeanV4(Parcel in) {
        super(in);
        this.code = in.readInt();
        this.gender = in.readString();
        this.ethnicity = in.readString();
        this.landMark = in.readParcelable(FaceContour.class.getClassLoader());
    }

    public static final Creator<FaceDetectBeanV4> CREATOR = new Creator<FaceDetectBeanV4>() {
        @Override
        public FaceDetectBeanV4 createFromParcel(Parcel source) {
            return new FaceDetectBeanV4(source);
        }

        @Override
        public FaceDetectBeanV4[] newArray(int size) {
            return new FaceDetectBeanV4[size];
        }
    };
}
